package com.matt.service.estimate;

import com.matt.domain.estimate.TeacherExtendEstimate;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestHeader;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

import static com.matt.foundation.constant.RequestConstant.TICKET;

public interface TeacherEstimateService {
    /**
     * 分页条件查询 时间降序
     * @param teacherName
     * @return
     */
    Page<TeacherExtendEstimate> getPage(String ticket,String teacherName, Integer pageNum, Integer pageSize,String areaId);

    /**
     * 小程序-家长端 新增评价 如果教师已被删除 则不能评价
     * @param teacherExtendEstimate
     * @return
     */
    TeacherExtendEstimate addTeacherEstimate(TeacherExtendEstimate teacherExtendEstimate);

    /**
     * 修改评价 (2025.01.18 暂不需要) 如果教师已被删除 则不能修改
     * @param teacherExtendEstimate
     * @return
     */
    TeacherExtendEstimate updateTeacherEstimate(TeacherExtendEstimate teacherExtendEstimate);

    /**
     * 删除评价 删除教师的同时删除评价
     * @param teacherExtendEstimate
     * @return
     */
    TeacherExtendEstimate deleteTeacherExtendEstimate(TeacherExtendEstimate teacherExtendEstimate);

    /**
     * 导出评价
     * @param response
     */
    void exportTeacherEstimate(HttpServletResponse response,@RequestHeader(TICKET) String ticket,
                               String teacherName, Integer pageNum, Integer pageSize,String areaId) throws IOException;

    /**
     * 查询详情
     * @param ticket
     * @param teacherExtendEstimate
     * @return
     */
    TeacherExtendEstimate teacherDetail(String ticket,TeacherExtendEstimate teacherExtendEstimate);

    /**
     * 远程
     * @param teacherExtendEstimate
     * @return
     */
    List<TeacherExtendEstimate> getPageList(TeacherExtendEstimate teacherExtendEstimate);
}
